<%@page import="dier.xuanke"%>
<%@page import="dier.Lesson"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"

    pageEncoding="UTF-8"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>

         <title>用户查询页面</title>

</head>
<style type="text/css">
   div {
    margin: 0 600px;
   }
   p {
    display: inline;
   }
   
   h2 {
    text-align: center;
    color: blue;
   }
   .xx{
    height: 1000px;
    width: 500;
    
   }
   
   .ys {
   Font-size:25px;
    color: green;
   }
 </style>
  <body>
 <div class="xx">
<form method="get" action="Stuxuankeimput.jsp">
<table border="1" width="500" cellspacing="0">
           <caption>课程目录</caption>
     <tr>
     		
           <th>课程编号</th>
           <th>课程名称</th>
           <th>开课时间</th>
           <th>开课节次</th>
           <th>所属学院</th>
           <th>任课教师工号</th>
           <th>任课教师名称</th>
           <th>选课限制人数</th>
           <th>课程已选人数</th>
           <th>选课</th>
    </tr>
    <% 
    String Name=null;
    try
    {Name=request.getParameter("Name");}
    catch(Exception e){}
    out.print(Name);
    int tid=-1;
  	try{
		
		tid=Integer.parseInt(request.getParameter("tid")+"");
  	}
  	catch(Exception e) {
  		e.printStackTrace();
  	}
  	Lesson ls=new Lesson();
  	xuanke xk=new xuanke();
	ls=xk.showkecheng(tid);
   %>
    <tr>
           <td><% out.print(ls.ClID);%></td>
           <td><% out.print(ls.Cname);%></td>
           <td><% out.print(ls.Ctime);%></td>
           <td><% out.print(ls.Cmany);%></td>
           <td><% out.print(ls.CClass);%></td>
           <td><% out.print(ls.CTeID);%></td>
           <td><% out.print(ls.CTename);%></td>
           <td><% out.print(ls.CPeople);%></td>
           <td><% out.print(ls.CHpeople);%></td>
			<td> 
			<input type="hidden" name="Name" value=<%=Name %>>
			<input type="hidden" name="CPeople" value=<%= ls.CPeople%>>
			<input type="hidden" name="CHpeople" value=<%=ls.CHpeople %>>
			<button name="tid" value=<%=tid%> type="submit">选课</button></td>
   </tr>
</table>
</form>
 </div>
 </body>
 </html>
 